﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<CodeCamp.Models.Sessions.SessionsEditViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
  <%= Html.Encode( Model.EventDisplayName ) %> | Edit a Session
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

  <h2>Edit this session</h2>
  <%= Html.ValidationSummary("Edit was unsuccessful. Please correct the errors and try again.") %>
  <% using ( Html.BeginForm() )
     {%>
      <fieldset>
        <legend>Fields</legend>
        <%= Html.Hidden( "SessionId", Model.SessionId ) %>
        <%= Html.Hidden( "PresenterId", Model.PresenterId )%>
        <div>
          <label for="Title">
            Title:</label>
          <%= Html.TextBox("Title", Model.Title) %>
          <%= Html.ValidationMessage("Title", "*") %>
        </div>
        <div>
          <label for="SessionMaterialsUrl">Session Material URL:</label>
          <%= Html.TextBox( "SessionMaterialsUrl", Model.SessionMaterialsUrl ) %>
          <%= Html.ValidationMessage("SessionMaterialsUrl", "*") %>
        </div>
        <div>
          <label for="Description">
            Description:</label>
          <%= Html.TextArea( "Description", Model.Description, 8, 72, null ) %>
          <%= Html.ValidationMessage("Description", "*") %>
        </div>
        <div>
          <input type="submit" value="Save" />
        </div>
      </fieldset>
  <% } %>
</asp:Content>
